package protocol

type MessageHeader uint16

const (
	// CONNECT 链接
	CONNECT MessageHeader = iota
	// ConnectAck 链接回执
	ConnectAck
	// PING 心跳
	PING
	// PUBLISH 发布消息
	PUBLISH
	// Subscribe 订阅
	Subscribe
	// UnSubscribe 取消订阅
	UnSubscribe
	// SubscribeAck 订阅/取消订阅 回执
	SubscribeAck
	// DISCONNECT 下线
	DISCONNECT
)

var FixHeaders = map[MessageHeader]struct{}{
	CONNECT:      {},
	ConnectAck:   {},
	PING:         {},
	PUBLISH:      {},
	Subscribe:    {},
	UnSubscribe:  {},
	SubscribeAck: {},
	DISCONNECT:   {},
}
